#ifndef INC_UNI_NLU_CONTENT_H_
#define INC_UNI_NLU_CONTENT_H_

typedef struct {
  uni_u32 key_word_hash_code; /* 存放识别词汇对应的hashcode */
  uni_u8  nlu_content_str_index; /* 存放nlu映射表中的索引，实现多个识别词汇可对应同一个nlu，暂支持256条，如果不够换u16 */
  char    *hash_collision_orginal_str /* 类似Java String equal，当hash发生碰撞时，赋值为识别词汇，否则设置为NULL */;
} uni_nlu_content_mapping_t;

enum {
  eCMD_wakeup_uni,
  eCMD_exitUni,
  eCMD_muteClean,
  eCMD_muteSet,
  eCMD_volumeUpUni,
  eCMD_volumeDownUni,
  eCMD_volumeMaxUni,
  eCMD_volumeMinUni,
  eCMD_volumeMidUni,
  eCMD_auto1,
  eCMD_auto2,
  eCMD_auto3,
  eCMD_auto4,
  eCMD_auto5,
  eCMD_auto6,
  eCMD_auto7,
  eCMD_auto8,
  eCMD_auto9,
  eCMD_auto10,
  eCMD_auto11,
  eCMD_auto12,
  eCMD_auto13,
  eCMD_auto14,
  eCMD_auto15,
  eCMD_auto16,
  eCMD_auto17,
  eCMD_auto18,
  eCMD_auto19,
  eCMD_auto20,
};

const char* const g_nlu_content_str[] = {
[eCMD_wakeup_uni] = "{\"asr\":\"小童小童\",\"cmd\":\"wakeup_uni\",\"pcm\":\"[103]\"}",
[eCMD_exitUni] = "{\"asr\":\"退下\",\"cmd\":\"exitUni\",\"pcm\":\"[104]\"}",
[eCMD_muteClean] = "{\"asr\":\"语音开启\",\"cmd\":\"muteClean\",\"pcm\":\"[105]\"}",
[eCMD_muteSet] = "{\"asr\":\"静音模式\",\"cmd\":\"muteSet\",\"pcm\":\"[106]\"}",
[eCMD_volumeUpUni] = "{\"asr\":\"增加音量\",\"cmd\":\"volumeUpUni\",\"pcm\":\"[107, 101]\"}",
[eCMD_volumeDownUni] = "{\"asr\":\"减少音量\",\"cmd\":\"volumeDownUni\",\"pcm\":\"[108, 102]\"}",
[eCMD_volumeMaxUni] = "{\"asr\":\"最大音量\",\"cmd\":\"volumeMaxUni\",\"pcm\":\"[101, 101]\"}",
[eCMD_volumeMinUni] = "{\"asr\":\"最小音量\",\"cmd\":\"volumeMinUni\",\"pcm\":\"[102, 102]\"}",
[eCMD_volumeMidUni] = "{\"asr\":\"中等音量\",\"cmd\":\"volumeMidUni\",\"pcm\":\"[109, 109]\"}",
[eCMD_auto1] = "{\"asr\":\"开灯\",\"cmd\":\"auto1\",\"pcm\":\"[110]\"}",
[eCMD_auto2] = "{\"asr\":\"关灯\",\"cmd\":\"auto2\",\"pcm\":\"[110]\"}",
[eCMD_auto3] = "{\"asr\":\"亮一点\",\"cmd\":\"auto3\",\"pcm\":\"[110]\"}",
[eCMD_auto4] = "{\"asr\":\"暗一点\",\"cmd\":\"auto4\",\"pcm\":\"[110]\"}",
[eCMD_auto5] = "{\"asr\":\"最亮\",\"cmd\":\"auto5\",\"pcm\":\"[110]\"}",
[eCMD_auto6] = "{\"asr\":\"最暗\",\"cmd\":\"auto6\",\"pcm\":\"[110]\"}",
[eCMD_auto7] = "{\"asr\":\"半亮\",\"cmd\":\"auto7\",\"pcm\":\"[110]\"}",
[eCMD_auto8] = "{\"asr\":\"冷光\",\"cmd\":\"auto8\",\"pcm\":\"[110]\"}",
[eCMD_auto9] = "{\"asr\":\"暖光\",\"cmd\":\"auto9\",\"pcm\":\"[110]\"}",
[eCMD_auto10] = "{\"asr\":\"自然光\",\"cmd\":\"auto10\",\"pcm\":\"[110]\"}",
[eCMD_auto11] = "{\"asr\":\"睡眠光\",\"cmd\":\"auto11\",\"pcm\":\"[110]\"}",
[eCMD_auto12] = "{\"asr\":\"作业光\",\"cmd\":\"auto12\",\"pcm\":\"[110]\"}",
[eCMD_auto13] = "{\"asr\":\"超人光\",\"cmd\":\"auto13\",\"pcm\":\"[110]\"}",
[eCMD_auto14] = "{\"asr\":\"呼吸光\",\"cmd\":\"auto14\",\"pcm\":\"[110]\"}",
[eCMD_auto15] = "{\"asr\":\"阅读光\",\"cmd\":\"auto15\",\"pcm\":\"[110]\"}",
[eCMD_auto16] = "{\"asr\":\"工作光\",\"cmd\":\"auto16\",\"pcm\":\"[110]\"}",
[eCMD_auto17] = "{\"asr\":\"吹水光\",\"cmd\":\"auto17\",\"pcm\":\"[110]\"}",
[eCMD_auto18] = "{\"asr\":\"定时半小时\",\"cmd\":\"auto18\",\"pcm\":\"[110]\"}",
[eCMD_auto19] = "{\"asr\":\"定时一小时\",\"cmd\":\"auto19\",\"pcm\":\"[110]\"}",
[eCMD_auto20] = "{\"asr\":\"关闭定时\",\"cmd\":\"auto20\",\"pcm\":\"[110]\"}",
};

/*TODO perf sort by hashcode O(logN), now version O(N)*/
const uni_nlu_content_mapping_t g_nlu_content_mapping[] = {
  {2322710330U/*小童小童*/, eCMD_wakeup_uni, NULL},
  {2179764309U/*噜卡使*/, eCMD_wakeup_uni, NULL},
  {3696535207U/*灯小二*/, eCMD_wakeup_uni, NULL},
  {2497873774U/*退下*/, eCMD_exitUni, NULL},
  {3698425106U/*语音开启*/, eCMD_muteClean, NULL},
  {1459339889U/*静音模式*/, eCMD_muteSet, NULL},
  {656604622U/*增加音量*/, eCMD_volumeUpUni, NULL},
  {1957016301U/*减少音量*/, eCMD_volumeDownUni, NULL},
  {268918386U/*最大音量*/, eCMD_volumeMaxUni, NULL},
  {4177521358U/*最小音量*/, eCMD_volumeMinUni, NULL},
  {3607692158U/*中等音量*/, eCMD_volumeMidUni, NULL},
  {2438769644U/*开灯*/, eCMD_auto1, NULL},
  {2389495330U/*关灯*/, eCMD_auto2, NULL},
  {175714954U/*亮一点*/, eCMD_auto3, NULL},
  {1982669269U/*暗一点*/, eCMD_auto4, NULL},
  {2437845006U/*最亮*/, eCMD_auto5, NULL},
  {2437845913U/*最暗*/, eCMD_auto6, NULL},
  {2395660950U/*半亮*/, eCMD_auto7, NULL},
  {2390536179U/*冷光*/, eCMD_auto8, NULL},
  {2436652647U/*暖光*/, eCMD_auto9, NULL},
  {3631241595U/*自然光*/, eCMD_auto10, NULL},
  {1454761033U/*睡眠光*/, eCMD_auto11, NULL},
  {2314754278U/*作业光*/, eCMD_auto12, NULL},
  {1130185436U/*超人光*/, eCMD_auto13, NULL},
  {3755952460U/*呼吸光*/, eCMD_auto14, NULL},
  {2977383435U/*阅读光*/, eCMD_auto15, NULL},
  {2337615417U/*工作光*/, eCMD_auto16, NULL},
  {3703661037U/*吹水光*/, eCMD_auto17, NULL},
  {3063989551U/*定时半小时*/, eCMD_auto18, NULL},
  {2217774873U/*定时一小时*/, eCMD_auto19, NULL},
  {2489819840U/*关闭定时*/, eCMD_auto20, NULL},
};

#endif
